<?php
require_once dirname(__FILE__).'/../bootstrap/unit.php';
 
$t = new lime_test(11);
 
$t->is(Blog::slugify('title 0'), 'title-0','::slugify() replaces a white space by a -');
$t->is(Blog::slugify('title 1'), 'title-1','::slugify() replaces a white space by a -');
$t->is(Blog::slugify('title 2'), 'title-2','::slugify() replaces a white space by a -');
$t->is(Blog::slugify('title 3'), 'title-3','::slugify() replaces a white space by a -');
$t->is(Blog::slugify('title 4'), 'title-4','::slugify() replaces a white space by a -');
$t->is(Blog::slugify('title 5'), 'title-5','::slugify() replaces a white space by a -');
$t->is(Blog::slugify(''), 'n-a', '::slugify() converts the empty string to n-a');
$t->is(Blog::slugify(' - '), 'n-a', '::slugify() converts a string that only contains non-ASCII characters to n-a');
$t->is(Blog::slugify('Développeur Web'), 'developpeur-web', '::slugify() removes accents');
if (function_exists('iconv'))
{
  $t->is(Blog::slugify('Développeur Web'), 'developpeur-web', '::slugify() removes accents');
}
else
{
  $t->skip('::slugify() removes accents - iconv not installed');
}
$t->is(Blog::slugify('Programming'), 'programming', '::slugify() converts all characters to lower case');
?>

